﻿using CarAppDomain.Rule.Entities;
using CarAppDto.Rule.RuleConfigDtos;
using D.UtilCore.Dtos;
using D.UtilSqlsugarOrm;

namespace CarAppService.Rule.IServices
{
    /// <summary>
    /// 规则组成参数接口
    /// </summary>
    public interface IRuleConfigEntityService : IBaseService<RuleConfigEntity>
    {
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="reqAdd"></param>
        /// <returns></returns>
        Task<ApiResult<int>> AddAsync(ReqAddRuleConfig reqAdd);

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        Task<ApiResult<int>> DeleteAsync(List<string> ids);

        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="reqModel"></param>
        /// <returns></returns>
        Task<ApiResult<int>> UpdateAsync(ReqUpdateRuleConfig reqModel);

        /// <summary>
        /// 单个查询
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<ApiResult<RepRuleConfig>> GetAsync(string id);

        /// <summary>
        /// 查询列表
        /// </summary>
        /// <param name="reqModel"></param>
        /// <returns></returns>
        Task<ApiResult<List<RepRuleConfig>>> QueryListAsync(ReqGueryRuleConfigList reqModel);

        /// <summary>
        /// 分页查询
        /// </summary>
        /// <param name="reqModel"></param>
        /// <returns></returns>
        Task<ApiResult<PageModel<RepRuleConfig>>> QueryPagesAsync(ReqQueryRuleConfigPage reqModel);

        /// <summary>
        /// 根据VIN码获取规则
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<ApiResult<List<RepRuleConfig>>> GetRuleConfigByVINAsync(string VIN);
    }
}
